package com.singularity.common.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.singularity.common.domain.dto.role.RoleInfoDTO;
import com.singularity.common.domain.dto.role.RoleListDTO;
import com.singularity.common.domain.entity.Role;
import com.singularity.common.domain.param.role.RoleListParam;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author 天
* @description 针对表【role(角色表)】的数据库操作Mapper
* @createDate 2023-08-26 14:16:55
* @Entity com.singularity.common.dao.mapper.Role
*/
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 根据用户id获取角色信息
     * @param userId
     * @return
     */
    List<RoleInfoDTO> selectByUserId(Integer userId);

    /**
     * 获取角色列表
     * @param roleListParam
     * @return
     */
    List<RoleListDTO> getRoleList(RoleListParam roleListParam);
}




